@import '../../style/themes/index.less';

@input-prefix-cls: ~'@{prefix}-input';

.@{input-prefix-cls} {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: rgba(0, 0, 0, 0.65);
  font-size: 32px;
  font-variant: tabular-nums;
  line-height: 1.5;
  list-style: none;
  font-feature-settings: 'tnum';
  position: relative;

  &-prefix {
    flex-shrink: 0;
    margin-right: 10px;
    box-sizing: border-box;
  }
  &-suffix {
    flex-shrink: 0;
    margin-left: 10px;
    text-align: right;
    box-sizing: border-box;
  }

  &-outter {
    overflow: hidden;
    width: 100%;
  }

  &-inner {
    width: 100%;
    flex: 1;
    position: relative;
    text-align: inherit;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    height: 56px;
    line-height: 1.5;
    -webkit-appearance: none;
    background-color: transparent;
    font-size: 32px;
    box-sizing: border-box;
    color: inherit;
  }

  &-clear {
    visibility: hidden;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    -webkit-mask-position: 50% 50%;
    mask-position: 50% 50%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100%;
    mask-size: 100%;
    background-color: currentColor;
    -webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.06%2012l3.006-3.005-1.06-1.06L12%2010.938%208.995%207.934l-1.06%201.06L10.938%2012l-3.005%203.005%201.06%201.06L12%2013.062l3.005%203.005%201.06-1.06L13.062%2012zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%2F%3E%3C%2Fsvg%3E);
    mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.06%2012l3.006-3.005-1.06-1.06L12%2010.938%208.995%207.934l-1.06%201.06L10.938%2012l-3.005%203.005%201.06%201.06L12%2013.062l3.005%203.005%201.06-1.06L13.062%2012zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%2F%3E%3C%2Fsvg%3E);
    background: rgba(0, 0, 0, 0.3);
    border: 0;
    padding: 0;
    outline: 0;

    &.visible {
      visibility: visible;
    }
  }

  &-disabled {
    .@{input-prefix-cls}-inner {
      color: @placeholder-color;
    }
  }
}

/** rest**/
textarea,
input {
  // Firefox
  &::-moz-placeholder {
    // #bfbfbf
    color: @placeholder-color;
    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
  }
  // Internet Explorer 10+
  &:-ms-input-placeholder {
    color: @placeholder-color;
  }
  // Safari and Chrome
  &::-webkit-input-placeholder {
    color: @placeholder-color;
  }
}

input[type='text'],
input[type='password'],
input[type='number'],
textarea {
  -webkit-appearance: none;
}
